<!doctype html>
<html>
  <head>
    <title>Notifications: Document for posting lifetime events of this page in a window.</title>
  </head>
  <body>
    <script>
      opener.postMessage('opened', '*');

      window.addEventListener('unload', function() {
          opener.postMessage('closed', '*');
      });
    </script>
  </body>
</html>